package arrays;

import java.util.ArrayList;
import java.util.Arrays;

public class a {

    public static void main(String[] args) {
        ArrayList<String> myArrayList = new ArrayList(2);
        myArrayList.add("fefef");
        myArrayList.add("a");
        myArrayList.add("b");
        myArrayList.add("c");
        myArrayList.add(4,"abc");
        System.out.println(Arrays.toString(myArrayList.toArray()));

               myArrayList.remove(2);
        System.out.println(Arrays.toString(myArrayList.toArray()));

        myArrayList.set(3,"cxyxj");
        System.out.println(Arrays.toString(myArrayList.toArray()));

        System.out.println(myArrayList.get(3));
    }
}
